package com.example.mall.domain;

import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.baomidou.mybatisplus.extension.activerecord.Model;

import java.util.Date;

import java.io.Serializable;

/**
 * <p>
 * 发送消息表
 * </p>
 *
 * @author whale
 * @since 2025-05-16
 */
@TableName("tb_sent_messages")
public class SentMessages extends Model<SentMessages> {

    private static final long serialVersionUID = 1L;

    /**
     * 发送消息唯一标识
     */
    @TableId("sent_id")
    private Long sentId;
    /**
     * RocketMQ 消息 ID
     */
    @TableField("message_id")
    private String messageId;
    /**
     * 消息所属主题
     */
    private String topic;
    /**
     * 消息标签
     */
    private String tag;
    /**
     * 消息内容
     */
    private String body;
    /**
     * 发送状态（0：未发送，1：已发送，2：发送失败）
     */
    @TableField("send_status")
    private Integer sendStatus;
    /**
     * 消息发送时间
     */
    @TableField("send_time")
    private Date sendTime;
    /**
     * 相关用户ID（关联用户表）
     */
    @TableField("user_id")
    private Long userId;
    /**
     * 相关订单ID（关联订单表）
     */
    @TableField("order_id")
    private Long orderId;
    /**
     * 消息描述或备注
     */
    private String description;
    /**
     * 记录创建时间
     */
    @TableField("create_date")
    private Date createDate;
    /**
     * 记录更新时间
     */
    @TableField("update_date")
    private Date updateDate;


    public Long getSentId() {
        return sentId;
    }

    public void setSentId(Long sentId) {
        this.sentId = sentId;
    }

    public String getMessageId() {
        return messageId;
    }

    public void setMessageId(String messageId) {
        this.messageId = messageId;
    }

    public String getTopic() {
        return topic;
    }

    public void setTopic(String topic) {
        this.topic = topic;
    }

    public String getTag() {
        return tag;
    }

    public void setTag(String tag) {
        this.tag = tag;
    }

    public String getBody() {
        return body;
    }

    public void setBody(String body) {
        this.body = body;
    }

    public Integer getSendStatus() {
        return sendStatus;
    }

    public void setSendStatus(Integer sendStatus) {
        this.sendStatus = sendStatus;
    }

    public Date getSendTime() {
        return sendTime;
    }

    public void setSendTime(Date sendTime) {
        this.sendTime = sendTime;
    }

    public Long getUserId() {
        return userId;
    }

    public void setUserId(Long userId) {
        this.userId = userId;
    }

    public Long getOrderId() {
        return orderId;
    }

    public void setOrderId(Long orderId) {
        this.orderId = orderId;
    }

    public String getDescription() {
        return description;
    }

    public void setDescription(String description) {
        this.description = description;
    }

    public Date getCreateDate() {
        return createDate;
    }

    public void setCreateDate(Date createDate) {
        this.createDate = createDate;
    }

    public Date getUpdateDate() {
        return updateDate;
    }

    public void setUpdateDate(Date updateDate) {
        this.updateDate = updateDate;
    }

    @Override
    public String toString() {
        return "SentMessages{" +
        ", sentId=" + sentId +
        ", messageId=" + messageId +
        ", topic=" + topic +
        ", tag=" + tag +
        ", body=" + body +
        ", sendStatus=" + sendStatus +
        ", sendTime=" + sendTime +
        ", userId=" + userId +
        ", orderId=" + orderId +
        ", description=" + description +
        ", createDate=" + createDate +
        ", updateDate=" + updateDate +
        "}";
    }
}
